﻿using System;

namespace TicTacToe.Core.Statistics
{
    public sealed class PlayerID
    {
        readonly Guid mId;
        readonly string mName;

        public Guid Id { get { return mId; } }
        public string Name { get { return mName; } }

        public static implicit operator Guid(PlayerID gid)
        {
            return gid.Id;
        }

        internal PlayerID(string name)
        {
            mId = Guid.NewGuid();
            mName = name;
        }

        internal PlayerID(Guid id, string name)
        {
            mId = id;
            mName = name;
        }
    }
}
